package com.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.dao.ClazzDao;
import com.dao.PaperDao;
import com.model.Clazz;
import com.model.Paper;
import com.service.PaperService;
import com.util.Pagination;
import com.util.QueryTerm;

@Component("PaperService")
public class PaperServiceImpl implements PaperService {

    public ClazzDao getClazzDao() {
        return clazzDao;
    }

    public void setClazzDao(ClazzDao clazzDao) {
        this.clazzDao = clazzDao;
    }

    public PaperDao getPaperDao() {
        return paperDao;
    }

    public void setPaperDao(PaperDao paperDao) {
        this.paperDao = paperDao;
    }

    @Resource
    private PaperDao paperDao;
    @Resource
    private ClazzDao clazzDao;

    @Override
    public List<Paper> getPaperList(Paper paper, Pagination page) {
        paperDao.getPaperList(paper, page);
        return null;
    }

    @Override
    public Pagination PaperList() {
        // return paperDao.PaperList();
        return null;

    }

    @Override
    public Pagination queryForPage(QueryTerm query) {
        return paperDao.queryForPage(query);

    }

    @Override
    public Paper findById(Integer id) {

        return paperDao.findById(id);
    }

    @Override
    public List findAll() {
        // TODO Auto-generated method stub
        return paperDao.findAll();
    }

    @Override
    public int SumPaper() {

        return paperDao.SumPaper();
    }

    @Override
    public boolean checkpw(String password, int pid) {

        return paperDao.checkpw(password, pid);
    }

    @Override
    public List showPaperScore(int i) {
        return paperDao.showPaperScore(i);

    }

    @Override
    public void paperDel(int id) {
        paperDao.paperDel(id);

    }

    @Override
    public void PaperEditInfo(Paper paper) {
        paperDao.PaperEditInfo(paper);

    }

    @Override
    public List ClazzList() {
        Clazz c = new Clazz();
        return clazzDao.ClazzList(c);
    }

}
